LinearConstraint Class Reference

#include <LinearConstraint.h>

List of all members.

Public Member Functions

 LinearConstraint ()
virtual void setTexrep (const float w, const float h)
virtual void setVertices (osg::Vec3Array *lp, const float width)
virtual osg::Geometry * makeGeometry (const osg::Vec3Array *points)
osg::Vec3Array * getNormals (const osg::Vec3Array *points)
virtual osg::DrawArrays * makeRoad () const
virtual osg::Vec3Array * getRoadVertices () const
virtual osg::Vec2Array * getRoadTexcoords (const osg::Vec3Array *points)
virtual osg::Vec3Array * getRoadNormals (const osg::Vec3Array *points) const
void setTexture (const char *tx)

Protected Attributes

osg::ref_ptr< osg::Vec2Array > _tcoords
osg::ref_ptr< osg::Vec3Array > _edgecoords
float txxrepAlong
float txyrepAcross
std::string texture
float width
osg::ref_ptr< osg::Vec3Array > _midline


Detailed Description

forces edges of a "road" to fit triangles if 2 roads cross, then the overlap will be replaced by a 'cross road' and the roads built up to the cross roads with a texture along its length.


Constructor & Destructor Documentation

LinearConstraint::LinearConstraint (   )  [inline]
 


Member Function Documentation

osg::Vec3Array* LinearConstraint::getNormals (  const osg::Vec3Array *  points  ) 
 

return normals array - flat shaded

virtual osg::Vec3Array* LinearConstraint::getRoadNormals (  const osg::Vec3Array *  points  )  const [virtual]
 

virtual osg::Vec2Array* LinearConstraint::getRoadTexcoords (  const osg::Vec3Array *  points  )  [virtual]
 

virtual osg::Vec3Array* LinearConstraint::getRoadVertices (   )  const [virtual]
 

virtual osg::Geometry* LinearConstraint::makeGeometry (  const osg::Vec3Array *  points  )  [virtual]
 

return a geometry that fills the constraint.

virtual osg::DrawArrays* LinearConstraint::makeRoad (   )  const [virtual]
 

Roads apply a texture proportional to length along the road line.

virtual void LinearConstraint::setTexrep (  const float  w,
const float  h
)  [inline, virtual]
 

Texture repeat distance across linear (often equal to width) and along its length

void LinearConstraint::setTexture (  const char *  tx  )  [inline]
 

Geometry will return with this texture applied:

virtual void LinearConstraint::setVertices (  osg::Vec3Array *  lp,
const float  width
)  [virtual]
 

generate constant width around line - creates the area to be cut into the terrain.


Member Data Documentation

osg::ref_ptr<osg::Vec3Array> LinearConstraint::_edgecoords [protected]
 

osg::ref_ptr<osg::Vec3Array> LinearConstraint::_midline [protected]
 

defines the midline of a road, rail etc

osg::ref_ptr<osg::Vec2Array> LinearConstraint::_tcoords [protected]
 

std::string LinearConstraint::texture [protected]
 

float LinearConstraint::txxrepAlong [protected]
 

float LinearConstraint::txyrepAcross [protected]
 

float LinearConstraint::width [protected]
 

width of a linear feature


The documentation for this class was generated from the following file:
Generated on Sun May 28 18:44:00 2006 by  doxygen 1.4.6-NO